package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.DeadlineNodeApproval;
import com.lh.service.DeadlineNodeApprovalService;
import com.lh.utils.Answer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/deadLineNodeApproval")
public class DeadlineNodeApprovalController {

    @Autowired
    private DeadlineNodeApprovalService deadlineNodeApprovalService;

    @RequestMapping("/commitApproval")
    public Answer<Object> commitApproval(@RequestBody JSONObject reqJson) {
        return deadlineNodeApprovalService.commitApproval(reqJson);
    }

    @RequestMapping("/updateDeadlineNodeApproval")
    public Answer<Object> updateDeadlineNodeApproval(@RequestBody DeadlineNodeApproval deadlineNodeApproval) {
        return deadlineNodeApprovalService.updateDeadlineNodeApproval(deadlineNodeApproval);
    }

    @RequestMapping("/deleteDeadlineNodeApproval")
    public Answer<Object> deleteDeadlineNodeApproval(@RequestBody JSONObject reqJson) {
        return deadlineNodeApprovalService.deleteDeadlineNodeApproval(reqJson);
    }
}
